package cz.fit.dpo.task1;

/**
 * class for representing what player must accomplish in order to win this game
 */
public class Winner extends Person {

	/**
	 * add another player's accomplishment
	 */
	public void addCondition(String what, String value, Game game) {
		if ( what.compareTo("isIn") == 0 ) {
			inRoom = game.findRoom(value);
		} else if ( what.compareTo("owns") == 0 ) {
			addOwnedItem(game.findItem(value));
		} else if ( what.compareTo("visited") == 0 ) {
			addVisitedRoom(game.findRoom(value));
		}		
	}

}
